<?php
	session_start();
	require 'include/configDB.php';
	$id_pengguna = $_SESSION['id_pengguna'];
	$query_siswa = mysql_query("SELECT * FROM siswa WHERE NIS='$id_pengguna'");
	$data = mysql_fetch_assoc($query_siswa);
	
	$kode_pos = $data['kode_pos'];
	$query_kode_pos = mysql_query("SELECT * FROM kode_pos WHERE kode_pos='$kode_pos'"); 
	$kode_pos_data = mysql_fetch_assoc($query_kode_pos);
	
	$id_kelas = $data['id_kelas'];
	$query_kelas = mysql_query("SELECT * FROM kelas WHERE id='$id_kelas'");
	$kelas_data = mysql_fetch_assoc($query_kelas);
	
	$id_jurusan = $kelas_data['id_jurusan'];
	$query_jurusan = mysql_query("SELECT * FROM jurusan WHERE id='$id_jurusan'");
	$jurusan_data = mysql_fetch_assoc($query_jurusan);

	$id_ortu = $data['id_ortu'];
	$query_id_ortu = mysql_query("SELECT * FROM ortu WHERE id='$id_ortu'");
	$ortu_data = mysql_fetch_assoc($query_id_ortu);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Data Siswa</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="clockp.js"></script>
<script type="text/javascript" src="clockh.js"></script> 
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="ddaccordion.js"></script>
<script type="text/javascript">
ddaccordion.init({
	headerclass: "submenuheader", //Shared CSS class name of headers group
	contentclass: "submenu", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["suffix", "<img src='images/plus.gif' class='statusicon' />", "<img src='images/minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})
</script>

<script type="text/javascript" src="jconfirmaction.jquery.js"></script>
<script type="text/javascript">
	
	$(document).ready(function() {
		$('.ask').jConfirmAction();
	});
	
</script>

<script language="javascript" type="text/javascript" src="niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="niceforms-default.css" />
<style>
	<?php include 'include_style.php'; ?>
</style>
</head>
<body>
<div id="main_container">

	<?php include 'header.php'; ?>
    
    <div class="main_content">
                
                    
    <div class="center_content">  
		
    
	
    <div class="left_content">
    
    		<?php include 'left_content.php'; ?>
    		<?php include 'calendar.php' ; ?>

    </div>  
    
    <div class="right_content">
	<h2>Data Siswa</h2>
		<div id="stylized" class="myform">
			<form id="form" name="form" method="post" action="index.html">
			<h1>Data Diri Siswa</h1>
			<table>
				<tr>
					<td>
						<label>Nomor Induk Siswa </label>
					</td>
					<td>
						<label><?php echo $data['NIS']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Tahun Masuk</label>
					</td>
					<td>
						<label><?php echo $data['tahun_masuk']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Jurusan</label>
					</td>
					<td>
						<label><?php echo $jurusan_data['nama']?></label>
					</td>
				</tr>    
				<tr>
					<td>
						<label>Nama Lengkap</label>
					</td>
					<td>
						<label><?php echo $data['nama']?></label>
				</tr>
				<tr>
					<td>
						<label> Tempat lahir</label>
					</td>
					<td>
						<label><?php echo $data['tempat_lahir']?></label>
					</td>
			   </tr>
			   <tr> 
					<td>  
						<label> Tanggal Lahir</label>
					</td>
					<td>    
					   <label><?php echo $data['tanggal_lahir']?></label>
					</td>
				<tr>
					<td>
						<label>Agama</label>
					</td>
					<td>
						<label><?php echo $data['agama']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Jenis Kelamin</label>
					</td>
					<td>  
						<label><?php echo $data['jenis_kelamin']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Alamat</label>
					</td>
					<td>
						<label><?php echo $data['alamat']?></label>
					<td>
				</tr>
				<tr>
					<td>
						<label>Kodepos</label>
					</td>
					<td>
						<label><?php echo $data['kode_pos']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Kota</label>
					</td>
					<td>
						<label><?php echo $kode_pos_data['kota']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Provinsi</label>
					</td>
					<td>
						<label><?php echo $kode_pos_data['provinsi']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>No. Telepon/HP</label>
					</td>
					<td>
						<label><?php echo $data['no_tlp']?></label>
					</td>
				</tr>
            </table>
               
            <h1>Data Orang Tua/Wali</h1>
            <table>
				<tr>
					<td>
						<label>Nama Ayah</label>
					</td>
						
					<td>
						<label><?php echo $ortu_data['nama_ayah']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Pekerjaan Ayah</label>
					</td>
					<td>
						<label><?php echo $ortu_data['pekerjaan_ayah']?></label>
					</td>
				</tr>
				<tr>	
					<td>
						<label>Nama ibu</label>
					</td>
					<td>
						<label><?php echo $ortu_data['nama_ibu']?></label>
					</td>
				</tr>
				<tr>	
					<td>
						<label>Pekerjaan ibu</label>
					</td>
					<td>
						<label><?php echo $ortu_data['pekerjaan_ibu']?></label>
					</td>
				</tr>
				<tr>
					<td>
						<label>Nama wali</label>
				   </td>
				   <td>
						<label><?php echo $ortu_data['nama_wali']?></label>
				   </td>	
				</tr>
				<tr>
					<td>
						<label>Alamat Wali</label>
					</td>
					<td>
						<label><?php echo $ortu_data['alamat_wali']?></label>
					<td>
				</tr>
			
				<tr>
					<td>
						<label>Kodepos</label>
					</td>
					<td>
						<label><?php echo $ortu_data['kode_pos_wali']?></label>
					</td>
				</tr>
                
				<tr>
					<td>
						<label>Kota</label>
					</td>
					<td>
						<label><?php echo $kode_pos_data['kota']?></label>
					</td>
				</tr>
                	
				<tr>
					<td>
						<label>Provinsi</label>
					</td>
					<td>
						<label><?php echo $kode_pos_data['provinsi']?></label>
					</td>
              	</tr>
               
               	<tr>
                	<td>
                		<label>No. Telepon/HP</label>
                	</td>
                	<td>
                		<label><?php echo $ortu_data['no_tlp_wali']?></label>
                	</td>
				</tr>
               
				<tr>
                	<td>
                		<label>email</label>
                	</td>
                	<td>
                		<label><?php echo $ortu_data['email_wali']?></label>
                	</td>
				</tr>
			</table>
          
			</form>
		</div>
    </div><!-- end of right content-->
            
                    
  </div>   <!--end of center content -->               
                    
                    
    
    
    <div class="clear"></div>
    </div> <!--end of main content-->
	
    
    <div class="footer">
        	<?php include 'footer.php'; ?>

    	
    </div>

</div>		
</body>
</html>